package com.chen.controller;

import lombok.Data;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;

/**
 * 设备点号信息
 *
 * @author chenyj
 * @date 2023/11/15
 */
@Data
public class DevicePointInformation {

    /**
     * 设备名称
     */
    private String device;

    /**
     * 点号对应关系
     */
    private Map<String, Object> values;

    public static void main(String[] args) {
        String dateString = "2017-05-08T22:35:00+09:00";
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX");
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        try {
            Date date = df.parse(dateString);
            System.out.println(date);
            String format1 = format.format(date);
            System.out.println(format1);
        } catch (ParseException e) {
            e.printStackTrace();
        }

    }
}
